package com.probiz.estore.eai.shippingchoice;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.util.List;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;

import com.probiz.estore.eai.catalog.InventoryClassMarshaller;
import com.probiz.estore.eai.catalog.generated.InventoryClass;
import com.probiz.estore.eai.catalog.generated.InventoryClassSet;
import com.probiz.estore.eai.common.GenericMarshaller;
import com.probiz.estore.eai.shippingchoice.generated.ShippingChoice;
import com.probiz.estore.eai.shippingchoice.generated.ShippingChoiceSet;
import com.probiz.estore.eai.shippingchoice.generated.ObjectFactory;
import com.probiz.estore.eai.exception.EaiException;
import com.probiz.estore.eai.order.generated.SaleorderSet;
import com.probiz.estore.eai.shippingchoice.generated.ShippingChoice;
import com.probiz.estore.eai.shippingchoice.generated.ShippingChoiceSet;



public class ShippingChoiceMarshaller extends GenericMarshaller<ShippingChoiceSet>{	

	@Override
	public JAXBElement<ShippingChoiceSet> populateEntitySetElement()
			throws EaiException {
		ObjectFactory factory = new ObjectFactory();

		ShippingChoiceSet shippingChoiceSet = factory.createShippingChoiceSet();
		shippingChoiceSet.setRoottag("shippingChoice");

		List<ShippingChoice> shippingChoiceList = shippingChoiceSet.getShippingchoice();
		
		ShippingChoice shippingChoice = factory.createShippingChoice();
		shippingChoice.setCode("0001");
		shippingChoice.setName("test");
		shippingChoiceList.add(shippingChoice);
		
		


		JAXBElement<ShippingChoiceSet> shippingChoiceDataElement=factory.createUfinterface(shippingChoiceSet);
	
		return shippingChoiceDataElement;
		
	}

	
	
}
